Imports Clo = Enhancements.Core.Logging
Imports Ref = System.Reflection
Imports Sys = System

Namespace Enhancements.Basic.Primitives
    ''' <summary>The exception that is thrown when an invalid string is used.</summary>
    <Serializable(), DebuggerStepThrough()> _
    Public NotInheritable Class StringInvalidException
        Inherits Sys.Exception

        Private Sub New(ByVal _objectName As System.String, ByVal _object As System.String)
            [ObjectName] = _objectName
            [Object] = _object
        End Sub

        Private __ObjectName As System.String = Nothing
        ''' <summary>Gets the name of the object that caused this exception.</summary>
        Public Property ObjectName() As System.String
            Get
                Return __ObjectName
            End Get
            Private Set(ByVal _value As System.String)
                __ObjectName = _value
            End Set
        End Property

        Private __Object As System.String = Nothing
        ''' <summary>Gets the value of the object that caused this exception.</summary>
        Public Property [Object]() As System.String
            Get
                Return __Object
            End Get
            Private Set(ByVal _value As System.String)
                __Object = _value
            End Set
        End Property

        Friend Shared Sub ___Throw(ByVal _objectName As System.String, ByVal _object As System.String)
            Dim _exception As StringInvalidException = New StringInvalidException(_objectName, _object)

            Throw _exception
        End Sub

    End Class
End Namespace
